@import 'shared.scss';

:local(.dialog) {
  background-color: $action-color;
  border-radius: 12px;
  box-shadow: 0px 5px 30px 1px #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  padding: 14px;
  text-align: center;
  position: relative;
  font-size: 1.0em;
  color: $action-text-color;
  pointer-events: auto;
  z-index: 3;
  
  a {
    color: $action-text-color;
    text-decoration: underline;
    font-weight: bold;
  }

  :local(.link-button) {
    @extend %action-button;
    @extend %action-button-selected;
    min-width: auto;
    margin-top: 4px;
    flex: 1;

    @media (max-height: 370px) {
      display: none;
    }
  }

  :local(.enter-vr-button) {
    @extend %action-button;
    background-color: transparent;
    position: absolute;
    bottom: 64px;
  }
}

:local(.modal) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  margin: 0;

  @media (min-height: 500px) {
    justify-content: center;
  }
}

:local(.invite-container-inverted) {
  :local(.invite-button) {
    @extend %action-button-selected;
  }
}

:local(.invite-container) {
  @extend %unselectable;
  position: absolute;
  top: 0;
  left: 0;
  margin-top: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  :local(.invite-button) {
    @extend %action-button;
    pointer-events: auto;
  }

  :local(.invite-button-lowered) {
    margin-top: 50px;
  }

  :local(.enter-button) {
    @extend %action-button;
    pointer-events: auto;
  }

  @media (max-height: 320px) {
    display: none;
  }

  :local(.hide-small-screens) {
    display: none;

    @media (min-height: 737px) {
      display: flex;
    }
  }

  :local(.invite-mini-button) {
    @extend %action-button;
    pointer-events: auto;
    display: none;
    background-color: var(--hud-panel-background);
    height: 28px;
    font-size: 0.8em;

    @media (max-height: 736px) and (min-height: 325px) {
      display: flex;
    }

    // Hide in landscape
    @media (max-height: 736px) and (min-aspect-ratio: 15/9) {
      display: none;
    }
  }
}

:local(.link-code){
  height: 20px;
  margin-top: 8px;
}

:local(.code-duration){
  font-size : 0.7em;
}

:local(.invite-container-below-hud) {
  margin-top: 76px;
}

:local(.attach-point) {
  width: 0; 
  height: 0; 
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid $action-color;
  position: absolute;
  top: -5px;
}

:local(.code) {
  color: var(--text-field-text-color);
  font-weight: bold;
  text-decoration: none;
  font-size: 2.0em;
  display: flex;
  margin: 12px;
  margin-bottom : 0px;
}

:local(.keep-open) {
  font-size: 0.8em;
}

:local(.domain) {
  input {
    @extend %default-font;
    font-weight: bold;
    text-decoration: none;
    color: var(--text-field-text-color);
    text-align: center;
    background-color: var(--text-field-background-color);
    border: 1px solid var(--text-field-border-color);
    border-radius: 12px;
    margin: 12px;
    font-size: 1.8em;
    padding: 14px 0;
    display: block;
    min-width: 295px;
    width: max-content;
  }
}


:local(.digit) {
  padding: 0 8px;
  margin: 2px;
  background-color: var(--text-field-background-color);
  border: 1px solid var(--text-field-border-color);
  border-radius: 12px;
  width: 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

:local(.digit_2) {
  margin-right: 8px;
}

:local(.digit_3) {
  margin-left: 8px;
}

:local(.code-loading-panel) {
  background: none;
}

:local(.hub-link-link) {
  font-size: 1.2em;
}

:local(.buttons) {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 400px;

  button, a {
    margin: 0 12px;
  }
}

:local(.embed) {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}

:local(.embed-text) {
  input {
    @extend %default-font;
    font-weight: bold;
    text-decoration: none;
    color: var(--text-field-text-color);
    text-align: center;
    background-color: var(--text-field-background-color);
    border: 1px solid var(--text-field-border-color);
    border-radius: 12px;
    margin: 12px 0 0 0;
    font-size: 1.2em;
    padding: 8px 14px;
    display: block;
    width: 295px;
  }
}
:local(.close) {
  position: absolute;
  cursor: pointer;
  width: 30px;
  height: 30px;
  min-width: auto;
  left: 12px;
  font-size: 1.5em;
  top: 12px;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  outline-style: none;
  border: 0;
  background-color: transparent;
  color: $action-text-color;
}

:local(.subscribe) {
  margin: 18px 0 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: $action-text-color;

  input {
    @extend %checkbox;
  }

  input:checked {
    @extend %checkbox-checked;
  }

  label {
    cursor: pointer;
    margin-right: 8px;
  }
}

:local(.embed-tip-wrap) {
  position: absolute;
  bottom: 0px;
  left: 0px;
  width: 100%;

  :local(.embed-tip) {
    @extend %tip-bubble;
    width: 450px;

    span {
      white-space: pre;
    }

    :local(.embed-tip-attach-point) {
      width: 0;
      height: 0;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-bottom: 5px solid $notice-background-color;
      position: absolute;
      top: -5px;
    }
  }
}
